<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
        <title></title>
        <meta charset="utf-8">
        <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <link rel="stylesheet" href="../css/ui-btn.css">
        <link rel="stylesheet" href="../css/ui-input.css">
        <link rel="stylesheet" href="../css/ui-img.css">
        <link rel="stylesheet" href="../css/ui-res.css">
        <link rel="stylesheet" href="../css/ui-list.css">
        <link rel="stylesheet" href="../css/ui-base.css">
        <link rel="stylesheet" href="../css/ui-box.css">
        <link rel="stylesheet" href="../css/ui-color.css">
        <script src="../js/zy/zy_control.js">
        </script>
        <script src="../js/zy/zy_click.js">
        </script>
        <script src="../js/jquery/jquery-1.8.3.min.js">
        </script>
        <script src="../js/common/spin.js">
        </script>
        <script src="../js/common/loading.js">
        </script>
        <script src="../js/config/system_config.js">
        </script>
        <script src="../js/zy/zy_json.js">
        </script>
        <script src="../js/chat/window_mgr.js">
        </script>
    </head>
    <body class="um-vp c-gra" ontouchstart>
        <!--块容器开始-->
        <div class="ub  c-gra  t-wh uc-a1 ">
            <div class="ub-f1 uinn uc-l1">
                <!--文本开始-->
                <form onsubmit="searchRecruitment()">
                    <div class="t-bla ub uba uc-a1 b-gra c-gra us-i uinput  uinn4">
                        <div class="res6  umw1 ub-img ">
                        </div>
                        <div class="ub-f1 uinn1">
                            <input name="searchRet" id="searchRet"placeholder="请输入检索内容" type="text" class="" style="background:none;" >
                        </div>
                    </div>
                </form><!--文本结束-->
            </div>
            <div class="ub-f1 uinn ">
                <!--按钮开始-->
                <div id="searchBtn"  ontouchstart="zy_touch('btn-act')" class="btn uba b-bla uinn5 c-gra  uc-a1 t-bla" onClick="searchRecruitment()">
                    查找
                </div>
                <!--按钮结束-->
            </div>
        </div>
        <!--块容器结束-->
        <!--块容器开始-->
        <div class="ub  b-wh c-gra  t-wh uc-a1 ">
            <div class=" b-wh ub-f1 uinn uc-l1">
                <!--按钮开始-->
                <div ontouchstart="zy_touch('btn-act')" class="btn uba b-bla uinn5 c-gra  uc-a1 t-bla" onclick="refrshPage()">
                    刷新列表
                </div>
                <!--按钮结束-->
            </div>
            <div class=" b-wh ub-f1 uinn ">
                <!--按钮开始-->
                <div ontouchstart="zy_touch('btn-act')" class="btn uba b-bla uinn5 c-gra  uc-a1 t-bla" onclick="fullPage()">
                    全部信息
                </div>
                <!--按钮结束-->
            </div>
            <div class=" b-wh ub-f1 uinn ">
                <!--按钮开始-->
                <div ontouchstart="zy_touch('btn-act')" class="btn uba b-bla uinn5 c-gra  uc-a1 t-bla" onclick="goHighSearch()">
                    高级检索
                </div>
                <!--按钮结束-->
            </div>
        </div>
        <!--块容器结束-->
		<div id="recruitmentList" class="ub ub-ver  uc-a1 uinn1">
			
			
		</div>
            <div  class="ub  b-wh c-gra  t-wh uc-a1 " ontouchstart="zy_touch('btn-act')"  >
                <div class=" b-wh ub-f1 uinn uc-l1">
                    　　　　　
                </div>
                <div class=" b-wh ub-f1 uinn ">
                    <!--按钮开始-->
                    <div id ="more" ontouchstart="zy_touch('btn-act')" class="btn uba b-bla uinn5 c-gra  uc-a1 t-bla" onclick="moreList()" style="display:none;"> 
                        更多内容...
                    </div>
                    <!--按钮结束-->
                </div>
                <div class="ub-f1 uinn uc-r1">
                    　　　　　
                </div>
            </div>
            <!--块容器结束-->
			            <!--块容器开始-->
            <div id ="noData"  style="display:none;">
                        没有符合查询条件的信息！
            </div>
            <!--块容器结束-->
        </div>
        <!--块容器结束-->
    </body>
    <script>
        zy_init();
        var jApp = $.noConflict(true);
        var keyWords;
        var listNum = 0;
        var curNum = 0;
        window.uexOnload = function(type){
            if (!type) {
                uexWindow.setBounce("1");
                uexWindow.showBounceView("0", "#FFF", "0");
                uexWindow.showBounceView("1", "#FFF", "0");
            }
            uexWindow.toast(1, 5, '正在获取信息列表...', 0);
            var getRecuitmentListUrl = SysConfig.serverPath + "recruitment/getRecuitmentListToJSON.action";
            var  params = [{
                    "key": "ret.queryRetTitle",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetId",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetWorkplace",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetIndustrySector",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetJobCategory",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetAnnualSalary",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryDayNum",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "cursor",
                    "type": "0",
                    "value": 0
                }];
				
            jApp.getJSON(getRecuitmentListUrl, getRecruitmentListSuccess, 'json', function(err){
                alert(err)
            }, 'POST', params, false);
        }
        
        function getRecruitmentListSuccess(data){
            if (data[0].responseState == 1) {
                uexWindow.alert('错误', data[0].responsePrompt, '确定');
				$("#more").hide();
				$("#noData").show();
            }
            else {
                if (data[0].responseData == 0) {
					$("#more").hide();
					$("#noData").show();
                }
                else {
                    for (var i = 0; i <= data[0].responseData.length - 1; i++) {
						var temp  = '<div class="uc-a1  c-wh c-gra" ontouchstart=zy_touch() onclick=opendetail("' + data[0].responseData[i].retId + '")>'
								  + '<ul ontouchstart="zy_touch(btn-act)" class="uc-t ub  t-bla ">'
								  + '<li class="ub-f1 ut-s ulev1">'+data[0].responseData[i].retFullName+'</li>'
								  + '<li class="tx-r t-org ulev1">'+data[0].responseData[i].retAnnualSalary+'</li></ul>'
								  + '<ul ontouchstart="zy_touch(btn-act)" class="t-bla "><li class="ub-f1 ut-s">'+data[0].responseData[i].retCreateDate+'</li></ul>'
								  + '<ul ontouchstart="zy_touch(btn-act)" class="t-bla "><li class="ub-f1 ut-s ulev-1">'+data[0].responseData[i].retWorkplace+'</li></ul>'
								  + '<ul ontouchstart="zy_touch(btn-act)" class="t-bla "><li class="ub-f1 ut-s ulev-1">'+data[0].responseData[i].retJobCategory+'</li></ul>'
								  + '<ul ontouchstart="zy_touch(btn-act)" class="t-bla "><li class="ub-f1 ut-s ulev">'+data[0].responseData[i].retIndustrySector+'</li></ul><hr/></div>';
                        $("#recruitmentList").append(temp);
                    }
					$("#noData").hide();
                    listNum = data[0].responseData[0].retSum;
                    if (listNum > parseInt(curNum) + 15) {
                        $("#more").show();
                    }
                    else {
                        $("#more").hide();
                    }
                }
            }
            uexWindow.closeToast();
        }
        
        function searchRetList(){
            uexWindow.toast(1, 5, '正在获取信息列表...', 0);
            $('#recruitmentList').html("");
			curNum = 0;
            var getRecuitmentListUrl = SysConfig.serverPath + "recruitment/getRecuitmentListToJSON.action";
            keyWords = $('#searchRet').val();
           	var params;
            if (localStorage["searchType"]!= undefined && localStorage["searchType"] =="1") {
                params = [{
                    "key": "ret.queryRetTitle",
                    "type": "0",
                    "value": keyWords
                }, {
                    "key": "ret.queryRetId",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetWorkplace",
                    "type": "0",
                    "value": localStorage.getItem('district')
                }, {
                    "key": "ret.queryRetIndustrySector",
                    "type": "0",
                    "value": localStorage.getItem('industry')
                }, {
                    "key": "ret.queryRetJobCategory",
                    "type": "0",
                    "value": localStorage.getItem('duty')
                }, {
                    "key": "ret.queryRetAnnualSalary",
                    "type": "0",
                    "value": localStorage.getItem('salary')
                }, {
                    "key": "ret.queryDayNum",
                    "type": "0",
                    "value": localStorage.getItem('dayRange')
                }, {
                    "key": "cursor",
                    "type": "0",
                    "value": 0
                }];
            }
            else if(localStorage["searchType"]!= undefined && localStorage["searchType"] =="2"){
				params = [{
                    "key": "ret.queryRetTitle",
                    "type": "0",
                    "value": keyWords
                }, {
                    "key": "ret.queryRetId",
                    "type": "0",
                    "value":  localStorage.getItem('sindustry')
                }, {
                    "key": "ret.queryRetWorkplace",
                    "type": "0",
                    "value": localStorage.getItem('sdistrict')
                }, {
                    "key": "ret.queryRetIndustrySector",
                    "type": "0",
                    "value": localStorage.getItem('sindustry')
                }, {
                    "key": "ret.queryRetJobCategory",
                    "type": "0",
                    "value": localStorage.getItem('sduty')
                }, {
                    "key": "ret.queryRetAnnualSalary",
                    "type": "0",
                    "value": localStorage.getItem('ssalary')
                }, {
                    "key": "ret.queryDayNum",
                    "type": "0",
                    "value": localStorage.getItem('sdayRange')
                }, {
                    "key": "cursor",
                    "type": "0",
                    "value": 0
                }];
		   }else{
                params = [{
                    "key": "ret.queryRetTitle",
                    "type": "0",
                    "value": keyWords
                }, {
                    "key": "ret.queryRetId",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetWorkplace",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetIndustrySector",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetJobCategory",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetAnnualSalary",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryDayNum",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "cursor",
                    "type": "0",
                    "value": 0
                }];
            }
            jApp.getJSON(getRecuitmentListUrl, getRecruitmentListSuccess, 'json', function(err){
                alert(err)
            }, 'POST', params, false);
        }
        
        function searchRecruitment(){
            $('#searchBtn').unbind('click');
            searchRetList();
        }
        
        function refrshPage(){
            $('#articleList').text("");
            searchRetList();
        }
        
        function opendetail(retId){
            uexWindow.open('recruitmentDetail', '0', 'recruitmentDetail.html', '1', '0', '0', '128');
            localStorage["retId"] = retId;
        }
        
        function highSearch(){
            uexWindow.toast(1, 5, '正在获取信息列表...', 0);
            $('#recruitmentList').html("");
			curNum = 0;
            var getRecuitmentListUrl = SysConfig.serverPath + "recruitment/getRecuitmentListToJSON.action";
            var params;
            if (localStorage["searchType"]!= undefined && localStorage["searchType"] =="2") {
                params = [{
                    "key": "ret.queryRetTitle",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetId",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetWorkplace",
                    "type": "0",
                    "value": localStorage.getItem('sdistrict')
                }, {
                    "key": "ret.queryRetIndustrySector",
                    "type": "0",
                    "value": localStorage.getItem('sindustry')
                }, {
                    "key": "ret.queryRetJobCategory",
                    "type": "0",
                    "value": localStorage.getItem('sduty')
                }, {
                    "key": "ret.queryRetAnnualSalary",
                    "type": "0",
                    "value": localStorage.getItem('ssalary')
                }, {
                    "key": "ret.queryDayNum",
                    "type": "0",
                    "value": localStorage.getItem('sdayRange')
                }, {
                    "key": "cursor",
                    "type": "0",
                    "value": 0
                }];
            }
            else {
                params = [{
                    "key": "ret.queryRetTitle",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetId",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetWorkplace",
                    "type": "0",
                    "value": localStorage.getItem('district')
                }, {
                    "key": "ret.queryRetIndustrySector",
                    "type": "0",
                    "value": localStorage.getItem('industry')
                }, {
                    "key": "ret.queryRetJobCategory",
                    "type": "0",
                    "value": localStorage.getItem('duty')
                }, {
                    "key": "ret.queryRetAnnualSalary",
                    "type": "0",
                    "value": localStorage.getItem('salary')
                }, {
                    "key": "ret.queryDayNum",
                    "type": "0",
                    "value": localStorage.getItem('dayRange')
                }, {
                    "key": "cursor",
                    "type": "0",
                    "value": 0
                }];
            }
            jApp.getJSON(getRecuitmentListUrl, getRecruitmentListSuccess, 'json', function(err){
                alert(err)
            }, 'POST', params, false);
        }
        
        function moreList(){
            uexWindow.toast(1, 5, '正在获取信息列表...', 0);
            var getRecuitmentListUrl = SysConfig.serverPath + "recruitment/getRecuitmentListToJSON.action";
            keyWords = $('#searchRet').val();
            curNum = parseInt(curNum) + 15;
            var params;
            if (localStorage["searchType"]!= undefined && localStorage["searchType"] =="1") {
                params = [{
                    "key": "ret.queryRetTitle",
                    "type": "0",
                    "value": keyWords
                }, {
                    "key": "ret.queryRetId",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetWorkplace",
                    "type": "0",
                    "value": localStorage.getItem('district')
                }, {
                    "key": "ret.queryRetIndustrySector",
                    "type": "0",
                    "value": localStorage.getItem('industry')
                }, {
                    "key": "ret.queryRetJobCategory",
                    "type": "0",
                    "value": localStorage.getItem('duty')
                }, {
                    "key": "ret.queryRetAnnualSalary",
                    "type": "0",
                    "value": localStorage.getItem('salary')
                }, {
                    "key": "ret.queryDayNum",
                    "type": "0",
                    "value": localStorage.getItem('dayRange')
                }, {
                    "key": "cursor",
                    "type": "0",
                    "value": curNum
                }];
            }
            else if (localStorage["searchType"]!= undefined && localStorage["searchType"] =="2"){
				params = [{
                    "key": "ret.queryRetTitle",
                    "type": "0",
                    "value": keyWords
                }, {
                    "key": "ret.queryRetId",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetWorkplace",
                    "type": "0",
                    "value": localStorage.getItem('sdistrict')
                }, {
                    "key": "ret.queryRetIndustrySector",
                    "type": "0",
                    "value": localStorage.getItem('sindustry')
                }, {
                    "key": "ret.queryRetJobCategory",
                    "type": "0",
                    "value": localStorage.getItem('sduty')
                }, {
                    "key": "ret.queryRetAnnualSalary",
                    "type": "0",
                    "value": localStorage.getItem('ssalary')
                }, {
                    "key": "ret.queryDayNum",
                    "type": "0",
                    "value": localStorage.getItem('sdayRange')
                }, {
                    "key": "cursor",
                    "type": "0",
                    "value": curNum
                }];
			}else {
                params = [{
                    "key": "ret.queryRetTitle",
                    "type": "0",
                    "value": keyWords
                }, {
                    "key": "ret.queryRetId",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetWorkplace",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetIndustrySector",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetJobCategory",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetAnnualSalary",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryDayNum",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "cursor",
                    "type": "0",
                    "value": curNum
                }];
            }
            
            jApp.getJSON(getRecuitmentListUrl, getRecruitmentListSuccess, 'json', function(err){
                alert(err)
            }, 'POST', params, false);
        }
		function fullPage(){
			uexWindow.toast(1, 5, '正在获取信息列表...', 0);
		    $('#recruitmentList').html("");
			curNum = 0;
            var getRecuitmentListUrl = SysConfig.serverPath + "recruitment/getRecuitmentListToJSON.action";
            var  params = [{
                    "key": "ret.queryRetTitle",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetId",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetWorkplace",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetIndustrySector",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetJobCategory",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryRetAnnualSalary",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "ret.queryDayNum",
                    "type": "0",
                    "value": ""
                }, {
                    "key": "cursor",
                    "type": "0",
                    "value": 0
                }];
				
            jApp.getJSON(getRecuitmentListUrl, getRecruitmentListSuccess, 'json', function(err){
                alert(err)
            }, 'POST', params, false);
		}
		
		function goHighSearch(){
   			if(checkLogin()){
                uexWindow.open('highSearch', 0, 'highSearch.html', 1, 0, 0, 0);
			}
        }
		
				function checkLogin()//检测是否登录
        {
            //如果没登录
            if (localStorage.getItem('memberInfo') == null) {
                uexWindow.open('memberLogin', '0', '../memberLogin.html?openerId=recruitment', '1', '', '', '0', '250');
                return false;
            }
            return true;
            
        }
    </script>
</html>
